package net.cathackers.devel.scmp.auth.interfaces;

import net.cathackers.devel.scmp.auth.exceptions.ProxyException;
import net.cathackers.devel.scmp.auth.exceptions.UserNotFoundException;
import net.cathackers.devel.scmp.exceptions.BackendConnectException;

public interface AuthenticationManagement {
    /**
     * Lock user to block it from authentication.
     * @param authenticationCredentials
     * @throws ProxyException 
     * @throws UserNotFoundException 
     * @throws BackendConnectException 
     * @throws UserNotFoundException
     * @throws BackendException
     */
    void lockAccount(AuthenticationCredentials authenticationCredentials) throws ProxyException, BackendConnectException, UserNotFoundException;
    /**
     * unlock a locked user.
     * @param authenticationCredentials
     * @throws ProxyException 
     * @throws UserNotFoundException 
     * @throws BackendConnectException 
     * @throws UserNotFoundException
     * @throws BackendException
     */
    void unlockAccount(AuthenticationCredentials authenticationCredentials) throws ProxyException, BackendConnectException, UserNotFoundException;
    /**
     * update the authentication information for a given user.
     * @param userID
     * @param newAuthenticationCredentials the new information to be set. (note that the userID can be changed)
     * @throws ProxyException 
     * @throws UserNotFoundException 
     * @throws BackendConnectException 
     */
    void updateAuthenticationInformation(UserID userID, AuthenticationCredentials newAuthenticationCredentials) throws ProxyException, UserNotFoundException, BackendConnectException;    
}
